
/* 聊天页面样式 */
.chat-container {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* 聊天头部 */
.chat-header {
  display: flex;
  align-items: center;
  padding-left: 10px;
  background-color: #fff;
  border-bottom: 1px solid #eee;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  z-index: 10;
  height: 80rpx;
  width: 100%;
  justify-content: center;
}

.chat-avatar-username-group {
  display: flex;
  align-items: center;
  flex: 1;
}

.chat-coach-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  margin-right: 12px;
  border: 1px solid #eee;
}

.chat-username {
  font-size: 32px;
  font-weight: 500;
  color: #333;
}

/* 聊天消息区域 */
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  background-color: #f5f5f5;
}

.chat-load-history-container {
  display: flex;
  justify-content: center;
  margin-bottom: 16px;
}

.chat-load-history-button {
  font-size: 20px;
  padding: 6px 16px;
  background-color: #fff !important;
  color: #666 !important;
  border: 1px solid #ddd !important;
  border-radius: 16px;
}

.chat-message-group {
  margin-bottom: 16px;
}

.chat-message-item {
  display: flex;
  align-items: flex-start;
  margin-bottom: 12px;
}

.chat-user-message-wrapper {
  flex-direction: row-reverse;
  margin-right: 10px;
}

.chat-other-message-wrapper {
  flex-direction: row;
}

.chat-message-avatar {
  margin: 0 8px;
}

.chat-avatar-small {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  border: 1px solid #eee;
}

.chat-message-content-wrapper {
  display: flex;
  flex-direction: column;
  max-width: 70%;
  margin-right: 10px;
}

.chat-message-username {
  display: flex;
  margin-bottom: 4px;
}

.chat-username-text {
  font-size: 25px;
  color: #999;
  margin-right: 8px;
}

.chat-message-bubble {
  position: relative;
  padding: 8px 12px;
  border-radius: 12px;
  word-break: break-word;
  max-width: 100%;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.chat-user-message {
  background-color: #9ee09e;
  margin-left: 8px;
  font-size: 28px;
  border-bottom-right-radius: 4px;
}

.chat-other-message {
  background-color: #fff;
  margin-right: 8px;
  font-size: 28px;
  border-bottom-left-radius: 4px;
}

.chat-message-text {
  font-size: 32px;
  color: #333;
  padding: 10px;
  margin: 10px;
  height: auto;
}

.chat-message-image {
  width: 180px;
  height: 180px;
  border-radius: 8px;
}

.chat-message-time {
  display: flex;
  margin-top: 4px;
  font-size: 11px;
  color: #ccc;
  align-items: flex-end;
}

.chat-user-message-wrapper .chat-message-time {
  justify-content: flex-end;
  margin-left: 8px;
}

.chat-other-message-wrapper .chat-message-time {
  justify-content: flex-start;
  margin-right: 8px;
}

.chat-time-text {
  font-size: 11px;
  margin-right: 16px;
}

.chat-empty-messages {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 200px;
}

.chat-empty-text {
  color: #999;
  font-size: 14px;
}

/* 输入区域 - 仿照微信设计风格 */
.chat-input-area {
  display: flex;
  align-items: center;
  padding: 8px 16px 12px 16px;
  background-color: #fff;
  border-top: 1px solid #eee;
  width: 100%;
  box-sizing: border-box;
}

.chat-input-controls {
  display: flex;
  flex-direction: column;
  margin-right: 12px;
  align-items: center;
  width: 50px;
}

.chat-input-control-btn {
  background: transparent !important;
  border: none !important;
  margin-bottom: 12px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.chat-input-control-btn:active {
  background-color: #f0f0f0 !important;
}

.chat-input-container {
  flex: 1;
  display: flex;
  align-items: center;
}

.chat-message-input {
  width: calc(100% - 135px);
  min-height: 60px;
  padding: 8px 15px;
  border: 1px solid #ddd;
  border-radius: 22px;
  background-color: #f5f5f5;
  font-size: 24px;
  line-height: 1.4;
  resize: none;
}

.chat-message-input::placeholder {
  color: #ccc;
}

.chat-message-send-button {
  width: 60px;
  height: 60px;
  background-color: #07C160 !important;
  border: none !important;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 10px;
  font-size: 25px;
  margin-right: 16px;
  color: white !important;
}

/* 响应式设计 */
@media (max-width: 375px) {
  .chat-messages {
    padding: 12px;
  }
  
  .chat-message-content-wrapper {
    max-width: 75%;
  }
  
  .chat-message-bubble {
    padding: 6px 10px;
  }
  
  .chat-message-text {
    font-size: 28px;
  }
  
  .chat-message-image {
    width: 160px;
    height: 160px;
  }
}

/* 滚动条样式 */
.chat-messages::-webkit-scrollbar {
  width: 4px;
}

.chat-messages::-webkit-scrollbar-track {
  background: transparent;
}

.chat-messages::-webkit-scrollbar-thumb {
  background: #ddd;
  border-radius: 2px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
  background: #ccc;
}